package com.szxy.provider.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: zwz
 * @Date:2020/7/1 17:08
 * @Description:com.szxy.provider.controller
 * @Version:1.0
 **/
@RestController
public class EchoController {

    @Value("${server.port}")
    private String port;

    @GetMapping("/echo/{message}")
    public ResponseEntity<String> echo(@PathVariable String message) {
        return ResponseEntity.ok(String.format("Hello , %s I'm %s", message, port));
    }

}
